import {BaseEntity,Column,Entity,Index,JoinColumn,JoinTable,ManyToMany,ManyToOne,OneToMany,OneToOne,PrimaryColumn,PrimaryGeneratedColumn,RelationId} from "typeorm";


@Entity("mall_collect",{schema:"nest-mall" } )
@Index("user_id",["userId",])
@Index("goods_id",["valueId",])
@Index("is_attention",["isAttention",])
export class MallCollect {

    @PrimaryGeneratedColumn({
        type:"mediumint", 
        name:"id"
        })
    id:number;
        

    @Column("mediumint",{ 
        nullable:false,
        default: () => "'0'",
        name:"user_id"
        })
    userId:number;
        

    @Column("mediumint",{ 
        nullable:false,
        default: () => "'0'",
        name:"value_id"
        })
    valueId:number;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"add_time"
        })
    addTime:number;
        

    @Column("tinyint",{ 
        nullable:false,
        width:1,
        default: () => "'0'",
        name:"is_attention"
        })
    isAttention:boolean;
        

    @Column("int",{ 
        nullable:false,
        default: () => "'0'",
        name:"type_id"
        })
    typeId:number;
        
}
